#!/usr/bin/python2.5

from pytz.gae import pytz  
from pytz import timezone    

def toUTC(naiveDT, source):    
    utcTZ = pytz.utc    
    sourceTZ = timezone(source)      
    targetDT = sourceTZ.localize(naiveDT)
    targetDT = targetDT.astimezone(utcTZ)
    return targetDT

def fromUTC(naiveDT, target):    
    utcTZ = pytz.utc
    targetTZ = timezone(target)  
    targetDT = utcTZ.localize(naiveDT)
    targetDT = targetDT.astimezone(targetTZ)
    return targetDT